package com.youlu.campus.admin.commission;


import com.youlu.campus.entity.commission.DistributionContentConfig;
import com.youlu.campus.service.commission.DistributionContentConfigService;
import com.yuelin.infrastructure.quantum.common.QResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class DistributionContentConfigController {

    @Autowired
    private DistributionContentConfigService distributionContentConfigService;

    @PostMapping("/distribution/config/save")
    public QResult saveOrUpdate(@RequestBody DistributionContentConfig distributionContentConfig){
        distributionContentConfigService.saveOrUpdate(distributionContentConfig);
        return QResult.success(null);
    }

    @GetMapping("/distribution/config/detail")
    public QResult detail(){
        return QResult.success(distributionContentConfigService.findOne());
    }
}
